package org.jeecg.modules.talent.Utils;

import com.github.pagehelper.PageInfo;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class PageUtils{
    //记录数据
    private List<?> records;
    //查询数据总记录数
    private long total;
    //前端总页数
    private int size;
    //前端显示当前页
    private int current;
    //排序
    private List<?> orders;
    //记录查询次数
    private boolean searchCount;
    //查询数据总页
    private int page;

    public PageUtils(PageInfo page){
        this.records=page.getList();
        this.total=page.getTotal();
        this.size=page.getSize();
        this.current=page.getPageNum();
        this.orders=new ArrayList<>();
        this.searchCount=true;
        this.page=page.getPages();
    }
}
